# 画课程PPT的图

import matplotlib.pyplot as plt
import numpy as np

from qiskit import QuantumCircuit, transpile
from qiskit.visualization import plot_bloch_multivector
from qiskit.circuit import ParameterVector
from qiskit.quantum_info import Pauli
from qiskit.primitives import Estimator

from qiskit.circuit import Gate
my_gate = Gate(name='U noisy', num_qubits=1, params=[])

qc = QuantumCircuit(1,1)
qc.append(my_gate, qc.qubits)
qc.barrier()

theta = ParameterVector('θ', 3)
qc.rx(theta[0], 0)
qc.ry(theta[1], 0)
qc.rz(theta[2], 0)
qc.barrier()
qc.measure(0, 0)

# 显示量子线路
qc.draw('mpl')
plt.show()